package DAO;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public interface Dao {
    public default Connection getConnection() throws DaoException{
        String dburl = "jdbc:mysql://127.0.0.1:3306/bookmanager";
        String username = "root";
        String password = "root";
        try{
            return DriverManager.getConnection(dburl, username, password);
        }catch (SQLException e){
            throw new DaoException();
        }
    }
}
